*******************************************
** ADRIAN SHIN                          ***
** Primary Resources, Secondary Labor   ***
** August, 2018                         ***
*******************************************
*This material is based upon work supported by the National Science Foundation Graduate Student Research Fellowship under Grant No. DGE 0718128, National Science Foundation Doctoral Dissertation Research Improvement Grants No. SES 1559661, and National Science Foundation (NSF) Graduate Research Opportunities Worldwide.

/** Table 3 **/
xtpcse forward_immipol immipol ln_oil_income_pc i.year i.ccode i.ccode#c.time if regime==0, noconst
estimates store MODEL1, title((1))
xtpcse forward_immipol immipol ln_oil_income_pc ln_gdp_pc gdp_growth ln_population polity_2 i.year i.ccode i.ccode#c.time if regime==0, noconst
estimates store MODEL2, title((2))
xtpcse forward_immipol immipol ln_oil_income_pc ln_gdp_pc gdp_growth ln_population polity_2 i.year i.ccode i.ccode#c.time if regime==0 & year<1914, noconst
estimates store MODEL3, title((3))
xtpcse forward_immipol immipol ln_oil_income_pc ln_gdp_pc gdp_growth ln_population polity_2 i.year i.ccode i.ccode#c.time if regime==0 & year>1913 & year<1946, noconst
estimates store MODEL4, title((4))
xtpcse forward_immipol immipol ln_oil_income_pc ln_gdp_pc gdp_growth ln_population polity_2 i.year i.ccode i.ccode#c.time if regime==0 & year<1946, noconst
estimates store MODEL5, title((5))
xtpcse forward_immipol immipol ln_oil_income_pc ln_gdp_pc gdp_growth ln_population polity_2 i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODEL6, title((6))
estout MODEL1 MODEL2 MODEL3 MODEL4 MODEL5 MODEL6, drop( *time*  *ccode* *year* )cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "models1_6.tex", replace style(tex)

/** Table 4 **/
xtpcse forward_immipol immipol ln_oil_income_pc ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODEL7, title((7))
xtpcse forward_immipol immipol ln_oil_income_pc ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 reer_annual i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODEL8, title((8))
xtpcse forward_immipol immipol ln_oil_income_pc ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 sstpy ptaxpy i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODEL9, title((9))
xtpcse forward_immipol immipol ln_oil_income_pc ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODEL10, title((10))
xtpcse forward_immipol immipol ln_oil_income_pc ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 reer_annual sstpy ptaxpy rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODEL11, title((11))
xtpcse forward_immipol immipol ln_oil_income_pc_ross ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODEL12, title((12))
xtpcse forward_immipol immipol ln_oil_income_pc_ross ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 reer_annual i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODEL13, title((13))
xtpcse forward_immipol immipol ln_oil_income_pc_ross ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 sstpy ptaxpy i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODEL14, title((14))
xtpcse forward_immipol immipol ln_oil_income_pc_ross ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODEL15, title((15))
xtpcse forward_immipol immipol ln_oil_income_pc_ross ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 reer_annual sstpy ptaxpy rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODEL16, title((16))
estout MODEL7 MODEL8 MODEL9 MODEL10 MODEL11 MODEL12 MODEL13 MODEL14 MODEL15 MODEL16, drop( *time*  *ccode* *year* )cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "models7_16.tex", replace style(tex)

/** Table 5 **/
xtpcse forward_immipol immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODEL17, title((17))
xtpcse forward_immipol immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 reer_annual i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODEL18, title((18))
xtpcse forward_immipol immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 sstpy ptaxpy i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODEL19, title((19))
xtpcse forward_immipol immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODEL20, title((20))
xtpcse forward_immipol immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 reer_annual sstpy ptaxpy rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODEL21, title((21))
estout MODEL17 MODEL18 MODEL19 MODEL20 MODEL21, drop( *time*  *ccode* *year* )cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "models17_21.tex", replace style(tex)

/** Table A1: Summary Statistics **/
sutex immipol ln_oil_income_pc ln_oil_income_pc_ross oil_gdp oil_ross_gdp_2000 ln_oil_exports ln_metal_income_pc ln_coal_income_pc ln_oil_gas_income_pc  ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 reer sstpy ptaxpy ud rwpvote schengen oecd eu elderly gov_right3 prop pres years_secondary_i secondary_complete_i years_tertiary_i tertiary_complete_i years_secondary_25_i secondary_complete_25_i   years_tertiary_25_i tertiary_complete_25_i migrants_pop original_migration_pop ascension_migration_pop original_tur_migration_pop ascension_turmex_migration_pop  if regime==0 & year>1945 & immipol!=., minmax lab

/** Table A2: Summary Statistics By Country **/
sum oil_income_pc if ccode==900 & year>1945
sum oil_income_pc if ccode==305 & year>1945
sum oil_income_pc if ccode==211 & year>1945
sum oil_income_pc if ccode==20 & year>1945
sum oil_income_pc if ccode==390 & year>1945
sum oil_income_pc if ccode==220 & year>1945
sum oil_income_pc if ccode==255 & year>1945
sum oil_income_pc if ccode==205 & year>1945
sum oil_income_pc if ccode==740 & year>1945
sum oil_income_pc if ccode==732 & year>1945
sum oil_income_pc if ccode==210 & year>1945
sum oil_income_pc if ccode==385 & year>1945
sum oil_income_pc if ccode==230 & year>1945
sum oil_income_pc if ccode==380 & year>1945
sum oil_income_pc if ccode==225 & year>1945
sum oil_income_pc if ccode==200 & year>1945
sum oil_income_pc if ccode==2 & year>1945
sum oil_income_pc if ccode==920 & year>1945
sum oil_income_pc if ccode==101 & year>1945
sum oil_income_pc if ccode==160 & year>1945
sum oil_income_pc if ccode==155 & year>1945
sum oil_income_pc if ccode==560 & year>1945
sum oil_income_pc if ccode==140 & year>1945

/** Table A3 **/
sort ccode year
xtreg manufacturing c.ln_oil_income_pc c.import_duties ln_gdp_pc gdp_growth polity_2 ln_population i.year if regime==0 & year>1959, robust
estimates store MODELA0, title((A0))
xtreg manufacturing c.ln_oil_income_pc c.import_duties ln_gdp_pc gdp_growth polity_2 ln_population l.manufacturing i.year if regime==0 & year>1959, robust
estimates store MODELA1, title((A1))
estout MODELA0 MODELA1, drop( *year* )cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "modelsA0_A1.tex", replace style(tex)

/** Table A4 **/
xtpcse forward_immipol immipol oil_gdp ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 reer_annual sstpy ptaxpy rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA2, title((A2))
xtpcse forward_immipol immipol oil_ross_gdp_2000 ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 reer_annual sstpy ptaxpy rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA3, title((A3))
xtpcse forward_immipol immipol ln_oil_exports ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 reer_annual i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA4, title((A4))
xtpcse forward_immipol immipol ln_oil_exports ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 reer_annual sstpy ptaxpy rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA5, title((A5))
estout MODELA2 MODELA3 MODELA4 MODELA5, drop( *time*  *ccode* *year* )cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "modelsA2_A5.tex", replace style(tex)

/** Table A5 **/
xtpcse forward_immipol immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  ud i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA6, title((A6))
xtpcse forward_immipol immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  elderly i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA7, title((A7))
xtpcse forward_immipol immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  gov_right3 prop pres i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA8, title((A8))
xtpcse forward_immipol immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  eu schengen oecd i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA9, title((A9))
xtpcse forward_immipol immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  ud elderly gov_right3 prop pres eu schengen oecd   i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA10, title((A10))
estout MODELA6 MODELA7 MODELA8 MODELA9 MODELA10, drop( *time*  *ccode* *year* )cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "modelsA6_A10.tex", replace style(tex)

/** Table A6 **/
xtpcse forward_immipol immipol ln_oil_gas_income_pc i.year i.ccode i.ccode#c.time if regime==0, noconst
estimates store MODELA11, title((A11))
xtpcse forward_immipol immipol ln_oil_gas_income_pc ln_gdp_pc gdp_growth ln_population polity_2 i.year i.ccode i.ccode#c.time if regime==0, noconst
estimates store MODELA12, title((A12))
xtpcse forward_immipol immipol ln_oil_gas_income_pc ln_gdp_pc gdp_growth ln_population polity_2 i.year i.ccode i.ccode#c.time if regime==0 & year<1914, noconst
estimates store MODELA13, title((A13))
xtpcse forward_immipol immipol ln_oil_gas_income_pc ln_gdp_pc gdp_growth ln_population polity_2 i.year i.ccode i.ccode#c.time if regime==0 & year>1913 & year<1946, noconst
estimates store MODELA14, title((A14))
xtpcse forward_immipol immipol ln_oil_gas_income_pc ln_gdp_pc gdp_growth ln_population polity_2 i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA15, title((A15))
xtpcse forward_immipol immipol ln_oil_gas_income_pc ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA16, title((A16))
xtpcse forward_immipol immipol ln_oil_gas_income_pc ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 reer_annual i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA17, title((A17))
xtpcse forward_immipol immipol ln_oil_gas_income_pc ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 sstpy ptaxpy i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA18, title((A18))
xtpcse forward_immipol immipol ln_oil_gas_income_pc ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA19, title((A19))
xtpcse forward_immipol immipol ln_oil_gas_income_pc ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 reer_annual sstpy ptaxpy rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA20, title((A20))
estout MODELA11 MODELA12 MODELA13 MODELA14 MODELA15 MODELA16 MODELA17 MODELA18 MODELA19 MODELA20, drop( *time*  *ccode* *year* )cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "modelsA11_A20.tex", replace style(tex)

/** Table A7 **/
xtpcse forward_immipol immipol c.ln_oil_gas_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA21, title((A21))
xtpcse forward_immipol immipol c.ln_oil_gas_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 reer_annual i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA22, title((A22))
xtpcse forward_immipol immipol c.ln_oil_gas_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 sstpy ptaxpy i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA23, title((A23))
xtpcse forward_immipol immipol c.ln_oil_gas_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA24, title((A24))
xtpcse forward_immipol immipol c.ln_oil_gas_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 reer_annual sstpy ptaxpy rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA25, title((A25))
xtpcse forward_immipol immipol c.ln_oil_gas_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  ud i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA26, title((A26))
xtpcse forward_immipol immipol c.ln_oil_gas_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  elderly i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA27, title((A27))
xtpcse forward_immipol immipol c.ln_oil_gas_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  gov_right3 prop pres i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA28, title((A28))
xtpcse forward_immipol immipol c.ln_oil_gas_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  eu schengen oecd i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA29, title((A29))
xtpcse forward_immipol immipol c.ln_oil_gas_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  ud elderly gov_right3 prop pres eu schengen oecd i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA30, title((A30))
estout MODELA21 MODELA22 MODELA23 MODELA24 MODELA25 MODELA26 MODELA27 MODELA28 MODELA29 MODELA30, drop( *time*  *ccode* *year* )cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "modelsA21_A30.tex", replace style(tex)

/** Table A8 **/
xtpcse forward_immipol immipol ln_metal_income_pc ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA31, title((A31))
xtpcse forward_immipol immipol ln_coal_income_pc ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA32, title((A32))
xtpcse forward_immipol immipol ln_metal_income_pc ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 i.year i.ccode i.ccode#c.time if regime==0, noconst
estimates store MODELA33, title((A33))
xtpcse forward_immipol immipol ln_coal_income_pc ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 i.year i.ccode i.ccode#c.time if regime==0, noconst
estimates store MODELA34, title((A34))
estout MODELA31 MODELA32 MODELA33 MODELA34, drop( *time*  *ccode* *year* )cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "modelsA31_A34.tex", replace style(tex)


/** Table A9 **/
qui xtpcse forward_immipol immipol c.ln_oil_income_pc##c.ln_importspc ln_gdp_pc gdp_growth ln_population polity_2 i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA35, title((A35))
qui xtpcse forward_immipol immipol c.ln_oil_income_pc##c.ln_importspc ln_gdp_pc gdp_growth ln_population polity_2 reer_annual i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA36, title((A36))
qui xtpcse forward_immipol immipol c.ln_oil_income_pc##c.ln_importspc ln_gdp_pc gdp_growth ln_population polity_2 sstpy ptaxpy i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA37, title((A37))
qui xtpcse forward_immipol immipol c.ln_oil_income_pc##c.ln_importspc ln_gdp_pc gdp_growth ln_population polity_2 rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA38, title((A38))
qui xtpcse forward_immipol immipol c.ln_oil_income_pc##c.ln_importspc ln_gdp_pc gdp_growth ln_population polity_2 reer_annual sstpy ptaxpy rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA39, title((A39))
qui xtpcse forward_immipol immipol c.ln_oil_income_pc##c.imports_gdp ln_gdp_pc gdp_growth ln_population polity_2 i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA40, title((A40))
qui xtpcse forward_immipol immipol c.ln_oil_income_pc##c.imports_gdp ln_gdp_pc gdp_growth ln_population polity_2 reer_annual i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA41, title((A41))
qui xtpcse forward_immipol immipol c.ln_oil_income_pc##c.imports_gdp ln_gdp_pc gdp_growth ln_population polity_2 sstpy ptaxpy i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA42, title((A42))
qui xtpcse forward_immipol immipol c.ln_oil_income_pc##c.imports_gdp ln_gdp_pc gdp_growth ln_population polity_2 rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA43, title((A43))
qui xtpcse forward_immipol immipol c.ln_oil_income_pc##c.imports_gdp ln_gdp_pc gdp_growth ln_population polity_2 reer_annual sstpy ptaxpy rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA44, title((A44))
estout MODELA35 MODELA36 MODELA37 MODELA38 MODELA39 MODELA40 MODELA41 MODELA42 MODELA43 MODELA44, drop(*time* *ccode* *year* )cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "modelsA35_A44.tex", replace style(tex)

/** Table A10 **/
qui xtpcse forward_immipol immipol c.ln_oil_income_pc##c.govright1 ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 sstpy ptaxpy i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA45, title((A45))
qui xtpcse forward_immipol immipol c.ln_oil_income_pc##c.govright2 ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 sstpy ptaxpy i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA46, title((A46))
qui xtpcse forward_immipol immipol c.ln_oil_income_pc##c.govright3 ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 sstpy ptaxpy i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA47, title((A47))
qui xtpcse forward_immipol immipol c.ln_oil_income_pc##c.govleft1 ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 sstpy ptaxpy i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA48, title((A48))
qui xtpcse forward_immipol immipol c.ln_oil_income_pc##c.govleft2 ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 sstpy ptaxpy i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA49, title((A49))
qui xtpcse forward_immipol immipol c.ln_oil_income_pc##c.govleft3 ln_gdp_pc gdp_growth ln_population polity_2 import_duties_100 sstpy ptaxpy i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA50, title((A50))
estout MODELA45 MODELA46 MODELA47 MODELA48 MODELA49 MODELA50, drop(*time* *ccode* *year* )cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "modelsA45_A50.tex", replace style(tex)

/** Table A11 **/
xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA51, title((A51))
xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 reer_annual i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA52, title((A52))
xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 sstpy ptaxpy i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA53, title((A53))
xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA54, title((A54))
xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 reer_annual sstpy ptaxpy rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA55, title((A55))
xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  ud i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA56, title((A56))
xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  elderly i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA57, title((A57))
xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  gov_right3 prop pres i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA58, title((A58))
xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  eu schengen oecd i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA59, title((A59))
xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  ud elderly gov_right3 prop pres eu schengen oecd   i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA60, title((A60))
estout MODELA51 MODELA52 MODELA53 MODELA54 MODELA55 MODELA56 MODELA57 MODELA58 MODELA59 MODELA60, drop( *time*  *ccode* *year* )cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "modelsA51_A60.tex", replace style(tex)

/** Table A12 **/
xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  years_secondary_i  i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA61, title((A61))
xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  secondary_complete_i i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA62, title((A62))
xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  years_tertiary_i  i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA63, title((A63))
xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  tertiary_complete_i i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA64, title((A64))
xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  years_secondary_25_i   i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA65, title((A65))
xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  secondary_complete_25_i   i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA66, title((A66))
xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  years_tertiary_25_i  i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA67, title((A67))
xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  tertiary_complete_25_i   i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA68, title((A68))
estout MODELA61 MODELA62 MODELA63 MODELA64 MODELA65 MODELA66 MODELA67 MODELA68, drop( *time*  *ccode* )cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "modelsA61_A68.tex", replace style(tex)

/** Table A13 **/
xtpcse forward_immipol immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  migrants_pop i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA69, title((A69))
xtpcse forward_immipol immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  original_migration_pop i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA70, title((A70))
xtpcse forward_immipol immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  ascension_migration_pop i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA71, title((A71))
xtpcse forward_immipol immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  original_tur_migration_pop i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA72, title((A72))
xtpcse forward_immipol immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  ascension_turmex_migration_pop   i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
estimates store MODELA73, title((A73))
estout MODELA69 MODELA70 MODELA71 MODELA72 MODELA73, drop( *time*  *ccode* *year* )cells(b(star fmt(3)) se(par fmt(3))) starlevels($^{+}$ 0.10 $^{*}$ 0.05 $^{**}$ 0.01 $^{***}$ 0.001) stats(N N_g r2, fmt(0 0 3) label(Observations Countries R$^2$)) label,  using "modelsA69_A73.tex", replace style(tex)

/** Table A15 & A16 **/
factor natcode skillcode citcode rightscode refcode asylcode reccode labcode decode encode famcode qcode, pcf

/** Figure 1a **/
qui xtpcse forward_immipol immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 sstpy ptaxpy i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
qui margins, dydx(ln_oil_income) at(import_duties_100=(0(2)18))
marginsplot, xsize(5) ysize(6) addplot(hist import_duties_100 if import_duties_100<18 & import_duties_100>0 & regime==0 & year>1945, yaxis(2) xscale(range(0(2)18)) yscale(range(-.04(.01).04)) yscale(axis(2) range(0 .5) off)lc(white%0) fcolor(gs14%60) xlabel(0(2)18)) ylabel(-.04(.01).04) recast(line) recastci(rarea) ciopts(fc(emidblue%70) lc(white%0)) yline(0) xtitle(Tariff Rate, size(medium)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white)) 
graph save "Figure 1a",replace
graph export "Figure 1a.pdf", replace

/** Figure 1b **/
qui xtpcse forward_immipol immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 reer_annual sstpy ptaxpy rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
qui margins, dydx(ln_oil_income) at(import_duties_100=(0(2)18))
marginsplot, xsize(5) ysize(6) addplot(hist import_duties_100 if import_duties_100<18 & import_duties_100>0 & regime==0 & year>1945, yaxis(2) xscale(range(0(2)18)) yscale(range(-.04(.01).04)) yscale(axis(2) range(0 .5) off)lc(white%0) fcolor(gs14%60) xlabel(0(2)18)) ylabel(-.04(.01).04) recast(line) recastci(rarea) ciopts(fc(emidblue%70) lc(white%0)) yline(0) xtitle(Tariff Rate, size(medium)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white)) 
graph save "Figure 1b",replace
graph export "Figure 1b.pdf", replace

/** Figure A1a **/
qui xtpcse forward_immipol immipol c.ln_oil_gas_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 sstpy ptaxpy i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
qui margins, dydx(ln_oil_gas_income_pc) at(import_duties_100=(0(2)18))
marginsplot, xsize(5) ysize(6) addplot(hist import_duties_100 if import_duties_100<18 & import_duties_100>0 & regime==0 & year>1945, yaxis(2) xscale(range(0(2)18)) yscale(range(-.04(.01).04)) yscale(axis(2) range(0 .5) off)lc(white%0) fcolor(gs14%60) xlabel(0(2)18)) ylabel(-.04(.01).04) recast(line) recastci(rarea) ciopts(fc(emidblue%70) lc(white%0)) yline(0) xtitle(Tariff Rate, size(large)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white)) 
graph save "Figure A1a",replace
graph export "Figure A1a.pdf", replace
/** Figure A1b **/
qui xtpcse forward_immipol immipol c.ln_oil_gas_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 reer_annual sstpy ptaxpy rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945,noconst
qui margins, dydx(ln_oil_gas_income_pc) at(import_duties_100=(0(2)18))
marginsplot, xsize(5) ysize(6) addplot(hist import_duties_100 if import_duties_100<18 & import_duties_100>0 & regime==0 & year>1945, yaxis(2) xscale(range(0(2)18)) yscale(range(-.04(.01).04)) yscale(axis(2) range(0 .5) off)lc(white%0) fcolor(gs14%60) xlabel(0(2)18)) ylabel(-.04(.01).04) recast(line) recastci(rarea) ciopts(fc(emidblue%70) lc(white%0)) yline(0) xtitle(Tariff Rate, size(large)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white)) 
graph save "Figure A1b",replace
graph export "Figure A1b.pdf", replace
/** Figure A1c **/
qui xtpcse forward_immipol immipol c.ln_oil_gas_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  elderly i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
qui margins, dydx(ln_oil_gas_income_pc) at(import_duties_100=(0(2)18))
marginsplot, xsize(5) ysize(6) addplot(hist import_duties_100 if import_duties_100<18 & import_duties_100>0 & regime==0 & year>1945, yaxis(2) xscale(range(0(2)18)) yscale(range(-.04(.01).04)) yscale(axis(2) range(0 .5) off)lc(white%0) fcolor(gs14%60) xlabel(0(2)18)) ylabel(-.04(.01).04) recast(line) recastci(rarea) ciopts(fc(emidblue%70) lc(white%0)) yline(0) xtitle(Tariff Rate, size(large)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white)) 
graph save "Figure A1c",replace
graph export "Figure A1c.pdf", replace
//* Figure A1d **/
qui xtpcse forward_immipol immipol c.ln_oil_gas_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  gov_right3 prop pres i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
qui margins, dydx(ln_oil_gas_income_pc) at(import_duties_100=(0(2)18))
marginsplot, xsize(5) ysize(6) addplot(hist import_duties_100 if import_duties_100<18 & import_duties_100>0 & regime==0 & year>1945, yaxis(2) xscale(range(0(2)18)) yscale(range(-.04(.01).04)) yscale(axis(2) range(0 .5) off)lc(white%0) fcolor(gs14%60) xlabel(0(2)18)) ylabel(-.04(.01).04) recast(line) recastci(rarea) ciopts(fc(emidblue%70) lc(white%0)) yline(0) xtitle(Tariff Rate, size(large)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white)) 
graph save "Figure A1d",replace
graph export "Figure A1d.pdf", replace
/** Figure A2a **/
qui xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 sstpy ptaxpy i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
qui margins, dydx(ln_oil_income_pc) at(import_duties_100=(0(2)18))
marginsplot, xsize(5) ysize(6) addplot(hist import_duties_100 if import_duties_100<18 & import_duties_100>0 & regime==0 & year>1945, yaxis(2) xscale(range(0(2)18)) yscale(range(-.04(.01).04)) yscale(axis(2) range(0 .5) off)lc(white%0) fcolor(gs14%60) xlabel(0(2)18)) ylabel(-.04(.01).04) recast(line) recastci(rarea) ciopts(fc(emidblue%70) lc(white%0)) yline(0) xtitle(Tariff Rate, size(large)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white)) 
graph save "Figure A2a",replace
graph export "Figure A2a.pdf", replace
/** Figure A2b **/
qui xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2 reer_annual sstpy ptaxpy rwpvote i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
qui margins, dydx(ln_oil_income_pc) at(import_duties_100=(0(2)18))
marginsplot, xsize(5) ysize(6) addplot(hist import_duties_100 if import_duties_100<18 & import_duties_100>0 & regime==0 & year>1945, yaxis(2) xscale(range(0(2)18)) yscale(range(-.04(.01).04)) yscale(axis(2) range(0 .5) off)lc(white%0) fcolor(gs14%60) xlabel(0(2)18)) ylabel(-.04(.01).04) recast(line) recastci(rarea) ciopts(fc(emidblue%70) lc(white%0)) yline(0) xtitle(Tariff Rate, size(large)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white)) 
graph save "Figure A2b",replace
graph export "Figure A2b.pdf", replace
/** Figure A2c **/
qui xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  elderly i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
qui margins, dydx(ln_oil_income_pc) at(import_duties_100=(0(2)18))
marginsplot, xsize(5) ysize(6) addplot(hist import_duties_100 if import_duties_100<18 & import_duties_100>0 & regime==0 & year>1945, yaxis(2) xscale(range(0(2)18)) yscale(range(-.04(.01).04)) yscale(axis(2) range(0 .5) off)lc(white%0) fcolor(gs14%60) xlabel(0(2)18)) ylabel(-.04(.01).04) recast(line) recastci(rarea) ciopts(fc(emidblue%70) lc(white%0)) yline(0) xtitle(Tariff Rate, size(large)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white)) 
graph save "Figure A2c",replace
graph export "Figure A2c.pdf", replace
/** Figure A2d **/
qui xtpcse immipol lagged_immipol c.ln_oil_income_pc##c.import_duties_100 ln_gdp_pc gdp_growth ln_population polity_2  gov_right3 prop pres i.year i.ccode i.ccode#c.time if regime==0 & year>1945, noconst
qui margins, dydx(ln_oil_income_pc) at(import_duties_100=(0(2)18))
marginsplot, xsize(5) ysize(6) addplot(hist import_duties_100 if import_duties_100<18 & import_duties_100>0 & regime==0 & year>1945, yaxis(2) xscale(range(0(2)18)) yscale(range(-.04(.01).04)) yscale(axis(2) range(0 .5) off)lc(white%0) fcolor(gs14%60) xlabel(0(2)18)) ylabel(-.04(.01).04) recast(line) recastci(rarea) ciopts(fc(emidblue%70) lc(white%0)) yline(0) xtitle(Tariff Rate, size(large)) title("") ytitle("") legend(off) graphregion(fcolor(white) lcolor(white)) 
graph save "Figure A2d",replace
graph export "Figure A2d.pdf", replace


